/**
 * Created by beck on 2015/8/24.
 */
$(document).ready(function(){
	$("div.xuanNav div:first-child").addClass("selected");
	$ul=$(".mainDiv ul");
    $("div.xuanNav>div").click(function(){
    	$(this).addClass("selected").siblings().removeClass("selected");
        var $index = $(this).index();
        $ul.eq($index).show().siblings().hide();        
    });    
	
	
	
	
	
    var Post = "mid="+basedata.mid+"&groupid="+basedata.groupid+"&did="+commondata.groupshow+"&pagesize=10&token="+basedata.token;
    $.ajax({
        url:'../../api/group/getshowmeinfobygidlist',
        type:'post',
        data:Post,
        success:function(msg){
        	if (msg.code ==100) {
        		console.log(msg);
        		for (var i = 0; i < msg.data.length; i++) {  
        		$li = document.createElement("li");
        		$li.innerHTML='<a href="xuanDtailes.html?bid='+
				msg.data[i].n0+'"><div class="commentPeople">'+
                    '<div class="imgLeft"><img src="'+
						msg.data[i].n1.split(",")[0]+'"></div>'+'<div class="imgRight"><span class="commentName">'+msg.data[i].n2+'</span><span style="margin-left:30%;">'+"关注热度"+msg.data[i].n6+'</span>'+
                    '<p class="commentDate">'+msg.data[i].n3+'</p></div>'+
                '</div>'+
                '<div class="myseleves">'+
                    '<span>'+msg.data[i].n4+'</span>'+
                '</div>'+
                '<div class="comContent">'+
                    '<img src="'+
					msg.data[i].n5.split(",")[0]+'">'+
                    '<img src="'+
					msg.data[i].n5.split(",")[0]+'">'+
                    '<img src="'+
					msg.data[i].n5.split(",")[0]+'">'+
                '</div></a>'+
                '<div style="margin-top:20px;">'+
                    '<span style="color:#00abfd;">'+msg.data[i].n7+'</span><span>人觉得很赞</span>'+
                    '<img style="width:20px;height:20px;margin-left:20%;" src="../../source/images/xuan/tubiao1.png">'+
                    '<img style="width:20px;height:20px;margin-left:5%;" src="../../source/images/xuan/tubiao2.png">'+
                    '<img style="width:20px;height:20px;margin-left:5%;" src="../../source/images/xuan/tubiao3.png">'+
                    '<img style="width:20px;height:20px;margin-left:5%;position:relative;bottom:2px;" src="../../source/images/xuan/tubiao4.png">'+
                '</div>'+
                '<div>'+
                    '<span>共有37条评论</span>'+'<span style="position:absolute;right:5%;">&gt;<span>'+
                '</div>';
        		$("#myCommentList").append($li);
        		}
        	}
        }
    });

});
